<html>
<head><meta charset="utf-8"><title>Stackoverflow: NonNull · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html">Stackoverflow: NonNull</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="151512146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151512146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151512146">(Dec 12 2018 at 09:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> could you update <a href="https://stackoverflow.com/questions/49392712/is-it-valid-to-use-ptrnonnull-in-ffi" target="_blank" title="https://stackoverflow.com/questions/49392712/is-it-valid-to-use-ptrnonnull-in-ffi">https://stackoverflow.com/questions/49392712/is-it-valid-to-use-ptrnonnull-in-ffi</a> ? <code>NonNull</code> is <code>repr(transparent)</code> nowadays</p>



<a name="151531093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151531093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151531093">(Dec 12 2018 at 15:10)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span>  look good now?</p>



<a name="151532014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151532014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151532014">(Dec 12 2018 at 15:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> why the caution? "should be safe". it's as safe as it'll get, we cannot do more than provide the guarantee and implement it correctly.</p>



<a name="151532099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151532099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151532099">(Dec 12 2018 at 15:24)</a>:</h4>
<p>fair enough. I didn't intend for the caution, but do you think it's better to say "so long as the wrapped type is"</p>



<a name="151533118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151533118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151533118">(Dec 12 2018 at 15:40)</a>:</h4>
<p>is what?</p>



<a name="151533171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151533171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151533171">(Dec 12 2018 at 15:41)</a>:</h4>
<p>... FFI safe</p>



<a name="151533391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Stackoverflow%3A%20NonNull/near/151533391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Stackoverflow.3A.20NonNull.html#151533391">(Dec 12 2018 at 15:44)</a>:</h4>
<p>ah sure. yes the requirement is of course always recursive, never hurts to point that out :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>